/**
 * 引入公共的js文件
 */

/*********************************/
/** 		  公共变量			**/
/*********************************/

var path;
/**
 * 获取项目路径
 */
function getProjectPath(){
	if(path==undefined||path==''){
	//获取当前网址，如： http://localhost:8083/uimcardprj/share/meun.jsp
	var curWwwPath = window.document.location.href;
	//获取主机地址之后的目录，如： uimcardprj/share/meun.jsp
	var pathName = window.document.location.pathname;
	var pos = curWwwPath.indexOf(pathName);
	//获取主机地址，如： http://localhost:8083
	var localhostPaht = curWwwPath.substring(0, pos);
	//获取带"/"的项目名，如：/uimcardprj
	var projectName = pathName.substring(0, pathName.substr(1).indexOf('/') + 1);
	//将项目路劲赋值给path变量以节省调用该函数的代码
		path = (localhostPaht + projectName);
	}
	return path;
}

getProjectPath();

document.write('<script type="text/javascript" src="'+path+'/resource/js/jquery-2.1.0.min.js" charset="UTF-8"></script>');
document.write('<script type="text/javascript" src="'+path+'/resource/jquery-validation/jquery.validate.min.js" charset="UTF-8"></script>');
document.write('<script type="text/javascript" src="'+path+'/resource/jquery-validation/messages-zh.js" charset="UTF-8"></script>');
document.write('<script type="text/javascript" src="'+path+'/resource/bootstrap/bootstrap.min.js" charset="UTF-8"></script>');
document.write('<script type="text/javascript" src="'+path+'/resource/bootstrap/bootstrap-table.js" charset="UTF-8"></script>');
document.write('<script type="text/javascript" src="'+path+'/resource/bootstrap/bootstrap-table-zh-CN.js" charset="UTF-8"></script>');
document.write('<script type="text/javascript" src="'+path+'/resource/bootstrap/bootstrap-table-export.js" charset="UTF-8"></script>');
document.write('<script type="text/javascript" src="'+path+'/resource/bootstrap/tableExport.js" charset="UTF-8"></script>');
document.write('<script type="text/javascript" src="'+path+'/resource/bootstrap/bootstrap-datetimepicker.min.js" charset="UTF-8"></script>');
document.write('<script type="text/javascript" src="'+path+'/resource/bootstrap/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>');
document.write('<script type="text/javascript" src="'+path+'/resource/layui/layui.all.js" charset="UTF-8"></script>');
document.write('<script type="text/javascript" src="'+path+'/resource/js/common-fn.js" charset="UTF-8"></script>');
